import type { DynamicField } from "@/data/wbsFields.ts";

export const tableFields: DynamicField[] = [
  {
    id: 0,
    name: "id",
    field: "id",
    type: "text",
    invisible: false,
  },
  {
    id: 1,
    name: "名称",
    field: "displayName",
    type: "text",
    invisible: true,
  },
  {
    id: 2,
    name: "类型",
    field: "typexName",
    type: "text",
    invisible: true,
  },
  {
    id: 3,
    name: "是否必填",
    field: "requiredName",
    type: "text",
    invisible: true,
  },
  {
    id: 4,
    name: "显示状态",
    field: "invisibleStatus",
    uiType: "switch",
    invisible: true,
    disable: "canOperate",
  },
  {
    id: 7,
    name: "是否禁止编辑",
    field: "isDisabled",
    uiType: "text",
    invisible: true,
  },
  {
    id: 5,
    name: "创建人",
    field: "user",
    type: "creatorName",
    invisible: false,
  },
  {
    id: 6,
    name: "创建时间",
    field: "createTime",
    type: "date",
    invisible: false,
  },
];

export const dialogFields: DynamicField[] = [
  {
    id: 1,
    name: "标题",
    field: "displayName",
    type: "text",
    invisible: true,
  },
  {
    id: 2,
    name: "字段类型",
    field: "uiType",
    type: "fieldSelect",
    invisible: true,
  },
  {
    id: 3,
    name: "默认值",
    field: "default",
    type: "text",
    invisible: true,
  },
  {
    id: 4,
    name: "必填项",
    field: "required",
    type: "switch",
    defaultValue: false,
    invisible: true,
  },
  {
    id: 5,
    name: "sort",
    field: "sort",
    type: "text",
    defaultValue: false,
    invisible: false,
  },
];
